//用户路由模块
const express=require("express")

//用户路由模块 
const userRouter=express.Router()

//导入用户处理模块
const user_handler=require("../router_handler/user_handler")

//导入@escook/express-joi
const expressjoi=require("@escook/express-joi")

//导入需要验证的规则对象
const {user_schema}=require("../schemea/user")

//登录模块
userRouter.post("/login",expressjoi(user_schema),user_handler.login)

//注册模块
userRouter.post("/reguser",expressjoi(user_schema),user_handler.regUser)


//导出用户模块
module.exports=userRouter